﻿<phone:PhoneApplicationPage
    x:Class="NGA.ContentPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
    FontFamily="DengXian"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    mc:Ignorable="d"
    shell:SystemTray.IsVisible="True"  d:DesignHeight="768" d:DesignWidth="480">

    <toolkit:TransitionService.NavigationInTransition>
        <toolkit:NavigationInTransition>
            <toolkit:NavigationInTransition.Backward>
                <toolkit:TurnstileTransition Mode="BackwardIn"/>
            </toolkit:NavigationInTransition.Backward>
            <toolkit:NavigationInTransition.Forward>
                <toolkit:TurnstileTransition Mode="ForwardIn"/>
            </toolkit:NavigationInTransition.Forward>
        </toolkit:NavigationInTransition>
    </toolkit:TransitionService.NavigationInTransition>
    <toolkit:TransitionService.NavigationOutTransition>
        <toolkit:NavigationOutTransition>
            <toolkit:NavigationOutTransition.Backward>
                <toolkit:TurnstileTransition Mode="BackwardOut"/>
            </toolkit:NavigationOutTransition.Backward>
            <toolkit:NavigationOutTransition.Forward>
                <toolkit:TurnstileTransition Mode="ForwardOut"/>
            </toolkit:NavigationOutTransition.Forward>
        </toolkit:NavigationOutTransition>
    </toolkit:TransitionService.NavigationOutTransition>

    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot" Background="Transparent">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="12"/>
        </Grid.RowDefinitions>

        <!--TitlePanel contains the name of the application and page title-->
        <StackPanel Grid.Row="0" Margin="4,0,4,0">
            <TextBlock Text="National Geography of Azeroth" Style="{StaticResource PhoneTextNormalStyle}"/>
            <TextBlock Text="大漩涡" Style="{StaticResource PhoneTextTitle1Style}" FontFamily="DengXian" FontSize="48"/>
        </StackPanel>

        <!--ContentPanel contains ListBox and ListBox ItemTemplate. Place additional content here-->
        <Grid x:Name="ContentPanel" Grid.Row="1" Margin="4,0,4,0">
            <ListBox x:Name="MainListBox" Margin="0,0,0,0" ItemsSource="{Binding Items}">
                <ListBox.ItemTemplate>
                    <DataTemplate>
                        <!--<StackPanel Margin="0,0,0,17" Width="432" Height="78">-->
                        <StackPanel Margin="0,0,0,8" Width="472">
                            <TextBlock x:Name="ThreadTitle" Text="{Binding ItemTitle}" TextWrapping="Wrap" Style="{StaticResource PhoneTextExtraLargeStyle}" FontFamily="DengXian" FontSize="32" />
                            <Grid x:Name="ThreadInfoGrid">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="*"/>
                                    <ColumnDefinition Width="*"/>
                                    <ColumnDefinition Width="96"/>
                                </Grid.ColumnDefinitions>
                                <TextBlock Text="{Binding ItemAuthor}"
                                           TextWrapping="NoWrap"
                                           Margin="12,-6,12,0"
                                           HorizontalAlignment="Left"
                                           Style="{StaticResource PhoneTextSubtleStyle}"
                                           FontFamily="DengXian"
                                           Grid.Column="0"/>
                                <TextBlock Text="{Binding ItemTail}"
                                           TextWrapping="NoWrap"
                                           Margin="12,-6,12,0"
                                           HorizontalAlignment="Right"
                                           Style="{StaticResource PhoneTextSubtleStyle}"
                                           FontFamily="DengXian"
                                           Grid.Column="1"/>
                                <TextBlock Text="{Binding ItemTail2}"
                                           TextWrapping="NoWrap"
                                           Margin="12,-6,12,0"
                                           HorizontalAlignment="Center"
                                           Style="{StaticResource PhoneTextSubtleStyle}"
                                           FontFamily="DengXian"
                                           Grid.Column="2"/>
                            </Grid>
                            

                            <!--<Grid Width="472">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="400"/>
                                    <ColumnDefinition Width="72"/>
                                </Grid.ColumnDefinitions>

                                <Grid Grid.Column="0" Margin="0">
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="Auto"/>
                                        <RowDefinition Height="*"/>
                                    </Grid.RowDefinitions>
                                    <TextBlock x:Name="ThreadTitle" Text="{Binding ItemTitle}" TextWrapping="Wrap" Style="{StaticResource PhoneTextExtraLargeStyle}" FontFamily="DengXian" FontSize="24" Grid.Row="0"/>
                                    <TextBlock Text="{Binding ItemAuthor}" TextWrapping="NoWrap" Style="{StaticResource PhoneTextSubtleStyle}" FontFamily="DengXian" Grid.Row="1"/>
                                </Grid>

                                <TextBlock 
                                    Text="{Binding ItemTail}"
                                    Margin="0"
                                    TextWrapping="Wrap"
                                    HorizontalAlignment="Center"
                                    VerticalAlignment="Center"
                                    Style="{StaticResource PhoneTextSubtleStyle}"
                                    FontFamily="DengXian"
                                    RenderTransformOrigin ="0,1"
                                    Grid.Column="1">
                                    <TextBlock.RenderTransform>
                                        <RotateTransform Angle="90"/>
                                    </TextBlock.RenderTransform>
                                </TextBlock>


                            </Grid>-->
                        </StackPanel>
                    </DataTemplate>
                </ListBox.ItemTemplate>
            </ListBox>
        </Grid>

        <ProgressBar Grid.Row="2" x:Name="loadProgress" Width="480" VerticalAlignment="Center" IsIndeterminate="True" Visibility="Visible"/>

    </Grid>

</phone:PhoneApplicationPage>